import request from '@/utils/request'

// 获取部门列表
export function getDepartments() {
  return request.get('/company/department')
}

// 获取部门人员列表
export function getEmployees() {
  return request.get('/sys/user/simple')
}

// 新增部门列表
export function addDepartment(data) {
  return request.post('/company/department', data)
}

// 获取部门详情
export function getDepartmentDetail(id) {
  return request.get(`/company/department/${id}`)
}

// 修改部门详情
export function editDepartmentDetail(data) {
  return request.put(`/company/department/${data.id}`, data)
}

// 删除部门
export function delDepartment(id) {
  return request.delete(`/company/department/${id}`)
}
